import { http } from 'uview-plus'

// 上传头像
export const uploadAvatarApi = (params) => http.post("/auth/uploadAvatar", params)

// 获取授权手机号
export const getPhoneNumberApi = (params) => http.post("/auth/getPhoneNumber", params)

// 登录
export const loginApi = (params) => http.post("/auth/login", params)

// 更新用户信息
export const updateUserInfoApi = (params, config) => http.put("/user/app/update", params, config)

// 获取用户信息
export const getUserInfoApi = (params) => http.get("/user/app/queryUserInfo", params)

// 根据字段key获取信息
export const getDictByKeyApi = (key) => http.get(`/system/dict/data/type/${key}`)

// 演员申请
export const actorApplyApi = (params) => http.post("/userApply/app", params)

// 其他认证申请
export const elseApplyApi = (params) => http.post("/userApply/app", params)

// 获取演员是否认证
export const getActorApplyApi = (params) => http.get("/business/performerApply/app/check", params)

// 获取商户是否认证
export const getMerchantApplyApi = (params) => http.get("/business/merchantApply/app/check", params)

// 获取其他认证是否认证
export const getElseApplyApi = (params) => http.get("/business/userApply/app/check", params)

// 获取认证列表
export const getCertificationListApi = (params) => http.get("/userApply/app/getApplyList", params)

// 获取轮播列表
export const getBannerListApi = (params) => http.get("/business/banner/app/list", params)

// 获取活动列表
export const getActivityListApi = (params) => http.get("/business/activity/app/list", params)

// 获取活动详情
export const getActivityDetailApi = (id) => http.get(`/business/activity/${id}`)

// 活动明细详情
export const getActivityInfoDetailApi = (id) => http.get(`/business/activityInfo/app/${id}`)

// 获取角色列表
export const getRoleListApi = (params) => http.get("/business/activityInfo/app/list", params)

// 获取消息类型列表
export const getMessageTypeListApi = (params) => http.get("/business/forumType/all", params)

// 获取消息列表
export const getMessageListApi = (params) => http.get("/business/forum/app/list", params)

// 获取消息详情
export const getMessageDetailApi = (id) => http.get(`/business/forum/${id}`)

// 获取消息详情
export const getAppMessageDetailApi = (id) => http.get(`/business/forum/app/${id}`)

// 浏览
export const addBrowseApi = (id) => http.get(`/business/forum/app/look/${id}`)

// 获取评论列表
export const getCommentListApi = (params) => http.get("/business/comment/app/list", params)

// 新增评论
export const addCommentApi = (params) => http.post("/business/comment/app", params)

// 删除评论
export const deleteCommentApi = (id) => http.delete(`/business/comment/app/${id}`)

// 获取演员列表
export const getActorListApi = (params) => http.get("/business/user/app/performer/list", params)

// 获取剧组列表
export const getCrewListApi = (params) => http.get("/business/user/app/group/list", params)

// 获取演员/剧组详情
export const getActorDetailApi = (params) => http.get("/business/user/app/info", params)

// 获取详情 公共接口
export const getDetailApi = (params) => http.get("/business/getDetails/app", params)

// 获取商城
export const getMallListApi = (params) => http.get("/business/storeType/app/productType/list", params)

// 获取下级分类
export const getSubCategoryListApi = (params) => http.get("/business/storeType/app/productType", params)

// 获取产品列表
export const getProductListApi = (params) => http.get("/business/product/app/list", params)

// 获取产品详情
export const getProductDetailApi = (params) => http.get(`/business/product/app/info`, params)

// 获取短剧交易列表
export const getDramaTradeListApi = (params) => http.get("/business/resource/app/list", params)

// 获取短剧交易详情
export const getDramaTradeDetailApi = (id) => http.get(`/business/resource/app/${id}`)

// 获取商品分类
export const getProductCategoryListApi = () => http.get("/business/storeType/app/tree/list")

// 点赞
export const addLikeApi = (params) => http.put("/business/forum/like", params)

// 查询产品可用时间段
export const getProductAvailableTimeApi = (params) => http.get("/business/order/app/product/available", params)

// 创建订单
export const createOrderApi = (params) => http.post("/business/order/appSubmit", params)

// 获取订单详情
export const getOrderInfoApi = (params) => http.get("/business/order/app/orderInfo", params)

// 获取订单列表
export const getOrderListApi = (params) => http.get("/business/order/app/list", params)

// 我要报名
export const signUpApi = (params) => http.post("/business/activityPeople/app/add", params)

// 获取作家剧本列表
export const getWriterScriptListApi = (params) => http.get("/business/writerScript/app/list", params)
